home *** CD-ROM | disk | FTP | other *** search
/ Delphi Magazine Collection 2001 / Delphi Magazine Collection 20001 (2001).iso / Bonus / DBaldwin / htmllite.exe / demo_src / LITEABT.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  2001-06-24  |  1.3 KB  |  69 lines

  1. {Version 7.25a}
  2. unit LiteAbt;
  3.  
  4. interface
  5.  
  6. uses
  7.   SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  8.   Forms, Dialogs, StdCtrls, Buttons, HTMLLite, ExtCtrls;
  9.  
  10. const
  11.   Version = '7.25a';
  12.  
  13. type
  14.   TAboutBox = class(TForm)
  15.     BitBtn1: TBitBtn;
  16.     Panel1: TPanel;
  17.     Viewer: ThtmlLite;
  18.   private
  19.     { Private declarations }
  20.   public
  21.     { Public declarations }
  22.     constructor CreateIt(Owner: TComponent);
  23.   end;
  24.  
  25. var
  26.   AboutBox: TAboutBox;
  27.  
  28. implementation
  29.  
  30. {$R *.DFM}
  31.  
  32. constructor TAboutBox.CreateIt(Owner: TComponent);
  33. var
  34.   S: string[255];
  35. begin
  36. inherited Create(Owner);
  37. Viewer.DefFontName := 'Arial';
  38. Viewer.DefFontSize := 9;
  39. Viewer.DefFontColor := clNavy;
  40. S :='<body bgcolor="ffffeb" text="000080">'+
  41.     '<center>'+
  42.     '<h1>'+'HTMLDemo</h1>'+
  43.     '<font color="Maroon">A demo program for the ThtmlLite component</font>'+
  44.     '<h3>Version '+Version+'</h3><font size="-1">Compiled with Delphi '+
  45. {$ifdef Windows}
  46.     '1'+
  47. {$endif}
  48. {$ifdef Ver90}
  49.     '2'+
  50. {$endif}
  51. {$ifdef Ver100}
  52.     '3'+
  53. {$endif}
  54. {$ifdef Ver120}
  55.     '4'+
  56. {$endif}
  57. {$ifdef Ver130}
  58.     '5'+
  59. {$endif}
  60. {$ifdef Ver140}
  61.     '6'+
  62. {$endif}
  63.     '</font></center>'+
  64.     '</body>';
  65. Viewer.LoadFromBuffer(@S[1], Length(S));
  66. end;
  67.  
  68. end.
  69.